package com.cjx.stars.constant;

/**
 * @author cjx
 * @description redis key TTL 常量
 * @createDate 2024/2/29 17:21
 **/
public class RedisConstant {
    /**
     * 用户保持登录key
     */
    public static final String USER_LOGIN_KEY = "user:login:";
    /**
     * 用户保持登录时间
     */
    public static final int USER_LOGIN_TTL = 30;

    /**
     * 注册验证码key
     */
    public static final String USER_REGISTER_CODE_KEY = "user:register:code:";
    /**
     * 用户注册验证码过期时间
     */
    public static final int USER_REGISTER_CODE_TTL = 15;

    /**
     * 博文点赞记录
     */
    public static final String BLOG_LIKED_KEY = "blog:like:";
    /**
     * 评论点赞记录
     */
    public static final String COMMENT_LIKED_KEY = "comment:like:";
    /**
     * 用户是否关注key
     */
    public static final String USER_FOLLOW_KEY = "user:follow:";
    /**
     * 最小缓存随机时间
     */
    public static final int MINIMUM_CACHE_RANDOM_TIME = 2;
    /**
     * 最大缓存随机时间
     */
    public static final int MAXIMUM_CACHE_RANDOM_TIME = 3;
    /**
     * 缓存时间偏移
     */
    public static final int CACHE_TIME_OFFSET = 10;
    /**
     * 博文推送key
     */
    public static final String BLOG_FEED_KEY = "bolg:feed:";

    /**
     * 博文数量key
     */
    public static final String MESSAGE_BLOG_NUM_KEY = "message:bolg:num:";

    /**
     * 点赞信息
     */
    public static final String MESSAGE_LIKE_NUM_KEY = "message:like:num:";
    /**
     * 用户推荐key
     */
    public static final String USER_RECOMMEND_KEY = "user:recommend:";
    /**
     * 用户推荐缓存存入时间
     */
    public static final int USER_RECOMMEND_TTL = 24;

    /**
     * 默认等待时间
     */
    public static final long DEFAULT_WAIT_TIME = 0;
    /**
     * 违约租赁时间
     */
    public static final long DEFAULT_LEASE_TIME = -1;
    /**
     * 修改邮箱key
     */
    public static final String USER_UPDATE_EMAIL_KEY = "user:update:email:";
    /**
     * 修改手机号key
     */
    public static final String USER_UPDATE_PHONE_KEY = "user:update:phone:";
    public static final String USER_PHONE_KEY = "user:phone:key:";
    /**
     * 用户忘记密码key
     */
    public static final String USER_FORGET_PASSWORD_KEY = "user:forget:password:";
    /**
     * 用户忘记密码时间
     */
    public static final int USER_FORGET_PASSWORD_TTL = 30;


    /**
     * 修改邮箱验证码过期时间 - 15分钟
     */
    public static final int USER_UPDATE_EMAIL_TTL = 15;

    public static final int USER_PHONE_TTL = 30;

}
